<?php

/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/
/**
 * Description of UserQuestion
 *
 * @author hoangle
 */
class Transaction {

    private $db;
    
    public function  __construct() {
        $this->db = Zend_Registry::get('db');
    }

    /**
     * @desc Get user question
     * @param <array> $arrParams (userid)
     * @return <array> data else NULL
     */
    public function getTransaction($arrParams) {
        try {
            $stmt = $this->db->prepare('CALL sp_getRefuseAnswer(:p_userid);');
            $stmt->bindValue('p_userid', $arrParams['userid']);
            $stmt->execute();
            $rows = $stmt->fetchAll();
            $stmt->closeCursor();
        }
        catch (Zend_Db_Exception $e) {
            throw new Zend_Exception($e);
        }
        return $rows;
    }

}

?>
